/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.stop.manage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.stop.common.constant.enums.ParkStopSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 园区停车位管理
 *
 * @author pig
 * @date 2024-02-18 15:59:12
 */
@Data
@TableName("closed_drive_stop_car")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "园区停车位管理")
public class ClosedDriveStopCarEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


    /**
     * 标识
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "标识")
    private Long id;

    /**
     * 所属停车场
     */
    @Schema(description = "所属停车场")
    private Long stopParkId;

    /**
     * 停车类型
     */
    @Schema(description = "停车类型")
    private Integer stopCarType;

    /**
     * 车位编号
     */
    @Schema(description = "车位编号")
    private String stopCarCode;

    /**
     * 是否预约
     */
    @Schema(description = "是否预约")
    private Boolean reserveFlag;

    /**
     * 是否使用
     */
    @Schema(description = "是否使用")
    private Boolean useFlag;

    /**
     * 预约时间
     */
    @Schema(description = "预约时间")
    private LocalDateTime reserveDate;

    /**
     * 车牌号
     */
    @Schema(description = "车牌号")
    private String carNumber;

    /**
     * 排序号
     */
    @Schema(description = "排序号")
    private Integer sort;

    /**
     * 定位
     */
    @Schema(description = "定位")
    private String location;

    /**
     * 车位图片
     */
    @Schema(description = "车位图片")
    private String img;

    /**
     * 车位颜色
     */
    @Schema(description = "车位颜色")
    private String colour;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 机构ID
     */
    @Schema(description = "机构ID")
    private Long orgId;

    public String getStopCarTypeStr() {
        return DictResolver.getItemLabelByValue(ParkStopSysDictEnum.stop_car_type, this.stopCarType);

    }

    public String getColourStr() {
        return DictResolver.getItemLabelByValue(ParkStopSysDictEnum.stop_car_color, this.colour);

    }


    public String getUseFlagStr() {
        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.useFlag);

    }

    public String getReserveFlagStr() {
        return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.reserveFlag);

    }

}
